﻿using System;
using System.Collections.Generic;

using System.Text;
using QUANLYCHAMCONG.DAO.DAO;
using QUANLYCHAMCONG.BL.Entities;
using System.Data;

namespace QUANLYCHAMCONG.BL.BUS
{
    public class PHONGBANBUS
    {
        public PHONGBANBUS() { }
        public static bool Insert(PHONGBAN pb)
        {
            PHONGBANDAO dao = new PHONGBANDAO();
            return dao.Insert(pb);
        }
        public static bool Update(PHONGBAN pb)
        {
            PHONGBANDAO dao = new PHONGBANDAO();
            return dao.Update(pb);
        }
        public static bool Delete(PHONGBAN pb)
        {
            PHONGBANDAO dao = new PHONGBANDAO();
            return dao.Delete(pb);
        }
        public static DataTable SelectAll()
        {
            PHONGBANDAO dao = new PHONGBANDAO();
            return dao.SelectALL();
        }
        public static DataTable SelectPK(PHONGBAN pb)
        {
            PHONGBANDAO dao = new PHONGBANDAO();
            return dao.SelectByPK(pb);
        }
        public static DataTable SelectBYCTY(PHONGBAN pb)
        {
            PHONGBANDAO dao = new PHONGBANDAO();
            return dao.SelectByCTY(pb);
        }
        public static string GetID()
        {
            PHONGBANDAO dao = new PHONGBANDAO();
            return "PB" + dao.GetID().ToString();
        }
    }
}
